#include <iostream>
using namespace std;
class Complex
{
private:
	double real;
	double imag;
public:
	Complex(double r,double i)
	{
		real = r;
		imag = i;
	}
	Complex(){}
	friend Complex operator+(Complex& c1, Complex& c2);
	void show() const { cout << "(" << real << "+" << imag << "i)"; }
};
Complex operator+(Complex& c1, Complex& c2)
{
	Complex c;
	c.real = c1.real + c2.real;
	c.imag = c1.imag + c2.imag;
	return c;
}

int main()
{
	Complex c1(1.1, 2.2);
	Complex c2(3.3, 4.4);
	Complex c3;
	c3 = c1 + c2;
	c3.show();
	return 0;
}